package com.itheima.lambda.test8;

public abstract class Animal {
    public abstract void eat();
}

class TestAnimal{
    public static void main(String[] args) {
        //1. 使用匿名内部类充当抽象类的子类对象
        Animal a = new Animal() {
            @Override
            public void eat() {
                System.out.println("龙吃鱼....");
            }
        };
    }
}